﻿<UserControl x:Class="PhantomTube.Views.LoginView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mui="http://firstfloorsoftware.com/ModernU"
             mc:Ignorable="d" 
             d:DesignHeight="1000" d:DesignWidth="850" Loaded="UserControl_Loaded">

    <Grid Name="mainGrid">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="1.5*"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="3*"/>
            </Grid.ColumnDefinitions>
            <Grid.Resources>
                <Style TargetType="TextBlock">
                    <Setter Property="Margin" Value="20" />
                    <Setter Property="FontSize" Value="18" />
                    <Setter Property="VerticalAlignment" Value="Center" />
                    <Setter Property="HorizontalAlignment" Value="Right" />
                </Style>
                <Style TargetType="TextBox">
                    <Setter Property="Width" Value="300" />
                    <Setter Property="Height" Value="30" />
                    <Setter Property="FontSize" Value="18" />
                    <Setter Property="HorizontalAlignment" Value="Left" />
                    <Setter Property="VerticalAlignment" Value="Center" />
                    <Setter Property="Margin" Value="20" />
                </Style>
                <Style TargetType="PasswordBox">
                    <Setter Property="Width" Value="300" />
                    <Setter Property="Height" Value="30" />
                    <Setter Property="FontSize" Value="18" />
                    <Setter Property="HorizontalAlignment" Value="Left" />
                    <Setter Property="VerticalAlignment" Value="Center" />
                    <Setter Property="Margin" Value="20" />
                </Style>
            </Grid.Resources>
            <TextBlock Text="Login to YouTube Account" Margin="210,0,10,15" Height="Auto" Width="Auto" FontWeight="Bold" FontSize="20" Grid.Row="0" Grid.ColumnSpan="2" HorizontalAlignment="Left"/>

            <StackPanel Grid.Column="0" Grid.Row="1">
                <TextBlock Text="User Name" HorizontalAlignment="Right"/>
            </StackPanel>
            <StackPanel Grid.Column="1" Grid.Row="1">
                <TextBox Name="tbMemberUserName" Text="{Binding UserName, Mode=TwoWay, UpdateSourceTrigger=Default}"   />
                <StackPanel Orientation="Horizontal">
                    <Button Name="btnLogin" Content="Login" Height="40" Width="150" HorizontalAlignment="Left" Margin="20" FontSize="20" Click="btnLogin_Click" IsDefault="True"/>
                    <TextBlock Text="" Grid.Column="0"
                               HorizontalAlignment="Right"
                               VerticalAlignment="Center"
                               Margin="20"
                               FontSize="18"
                               Foreground="Red"
                               Name="tbValidationMessage" Visibility="Hidden" />
                </StackPanel>
                <ProgressBar Name="pbLoginLoading" Minimum="0" Maximum="1" Height="16" IsIndeterminate="True" Margin="0,0,0,16" Grid.Row="2" Grid.Column="2" Visibility="Hidden"/>
            </StackPanel>
        </Grid>
    </Grid>
</UserControl>
